# Maintainer: David Runge <dvzrv@archlinux.org>

_name=openAV-Luppp
pkgname=luppp
pkgver=1.2.1
pkgrel=4
pkgdesc="A music creation tool, intended for live use"
arch=(loong64 x86_64)
url="http://openavproductions.com/luppp/"
license=(GPL3)
groups=(pro-audio)
depends=(
  cairo
  gcc-libs
  glibc
  jack
  liblo
  libsamplerate
  libsndfile
  libx11
  ntk
)
makedepends=(meson)
source=(https://github.com/openAVproductions/$_name/archive/release-$pkgver/$_name-release-$pkgver.tar.gz)
sha512sums=('8a0dc5688f7bc1868aca02205408cf31d380c0e230d8eae703e23c4f888f4a2738ba48540aec3940112ece576da59882036f3057fb04793af72add2ce04fb01f')
b2sums=('c9146674b11be5bc6211d2794c1af7c1a11aa966edb9e8a5bcffc390eff31bc7ddef2ef590c0455de9769a228d423bbc00fcf91bbf3dca9d71b6fd9d2feb7039')

build() {
  arch-meson build $_name-release-$pkgver
  ninja -C build
}

package() {
  depends+=(
    jack libjack.so
    liblo liblo.so
    ntk libntk.so
    libsamplerate libsamplerate.so
    libsndfile libsndfile.so
  )

  DESTDIR="$pkgdir" meson install -C build
  install -vDm 644 $_name-release-$pkgver/{CHANGELOG,README.md} -t "$pkgdir/usr/share/doc/$pkgname/"
  install -vDm 644 $_name-release-$pkgver/resources/controllers/*.ctlr -t "$pkgdir/usr/share/$pkgname/"
}
